package thread;

class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println(getName()+"该线程正在执行!");
    }
}
public class ThreadTest {
    public static void main(String[] args) {
        System.out.println("主线程1");
        MyThread mt=new MyThread();
        System.out.println("主线程2");
        mt.start();//启动线程, 只能启动一次
        System.out.println("主线程3");
    }
}
